//
//  XQOrderListPageLabels.m
//  JoinPeso
//
//  Created by 小琦 on 2024/11/21.
//

#import "XQOrderListPageLabels.h"

@interface XQOrderListPageLabels()
@property (nonatomic,strong) UIView *contentView;
@property (nonatomic,strong) UILabel *leftLb;
@property (nonatomic,strong) UILabel *rightLb;
@end

@implementation XQOrderListPageLabels

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self makeUI];
        [self makeConstraints];
    }
    return self;
}

- (void)makeUI {
    [self addSubview:self.contentView];
    [self.contentView addSubview:self.leftLb];
    [self.contentView addSubview:self.rightLb];
}

- (void)makeConstraints {
    [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(@0);
        make.width.equalTo(@200);
        make.bottom.equalTo(@0);
        make.height.mas_equalTo(17);
    }];
    [self.leftLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@6);
        make.top.bottom.equalTo(@0);
        make.width.mas_equalTo(100);
    }];
    [self.rightLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftLb.mas_right);
        make.right.equalTo(@15);
        make.top.bottom.equalTo(@0);
    }];
}

#pragma mark - setter

- (void)setLeft:(NSString *)left {
    self.leftLb.text = left;
}

- (void)setRight:(NSString *)right {
    self.rightLb.text = right;
}

#pragma mark - lazy

- (UIView *)contentView {
    if (!_contentView) {
        _contentView = [[UIView alloc] init];
    }
    return _contentView;
}

- (UILabel *)leftLb {
    if (!_leftLb){
        _leftLb = [[UILabel alloc] init];
        _leftLb.textColor = k999999Color;
        _leftLb.font = [UIFont systemFontOfSize:12];
        _leftLb.textAlignment = NSTextAlignmentLeft;
    }
    return _leftLb;
}

- (UILabel *)rightLb {
    if (!_rightLb) {
        _rightLb = [[UILabel alloc] init];
        _rightLb.textColor = kBlackTextColor;
        _rightLb.font = [UIFont boldSystemFontOfSize:12];
        _rightLb.textAlignment = NSTextAlignmentRight;
    }
    return _rightLb;
}

@end
